-- GENERATED SPELL FOR [Lord Lakmaeran] --


function spell0_12803(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_12803', 643, 1)
end

function spell1_12803(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(20543,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12803', 2000, 1)
end

function spell2_12803(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(20545,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12803', 0, 1)
end

function spell3_12803(pUnit, Event) --@Static Conduit,n/a--
pUnit:FullCastSpellOnTarget(20542,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12803', 15000, 1)
end

function Sorts_12803(pUnit, Event)
local choix_sorts_12803 = math.random(0, 3)
if choix_sorts_12803 == 0 then
pUnit:RegisterEvent('spell0_12803', 1, 1)
end
if choix_sorts_12803 == 1 then
pUnit:RegisterEvent('spell1_12803', 1, 1)
end
if choix_sorts_12803 == 2 then
pUnit:RegisterEvent('spell2_12803', 1, 1)
end
if choix_sorts_12803 == 3 then
pUnit:RegisterEvent('spell3_12803', 1, 1)
end
end

function mob12803_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12803', math.random(1500, 3000), 1)
end

function mob12803_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12803_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12803_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12803, 1, 'mob12803_Action')
RegisterUnitEvent(12803, 2, 'mob12803_Leave')
RegisterUnitEvent(12803, 3, 'mob12803_Kill')
RegisterUnitEvent(12803, 4, 'mob12803_Die')
